package viewbuilder

class ZebraTable {

    def render(builder, rows) {

        builder.table {
            rows.eachWithIndex {row, i ->
                tr('class': (i.mod(2) == 0) ? 'highlight' : '') {
                    td("col1")
                    td("col2")
                }
            }
        }
    }
}
